package com.anyi.blog.mapper;

import com.anyi.blog.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.security.core.userdetails.UserDetails;

@Mapper
public interface UserMapper {
    @Select("SELECT * FROM user WHERE username = #{username} and password=#{password}")
    User login(String username,String password);


    int register(User request);

    @Select("Select * from user where id = #{register}")
    User SelectById(int register);

    @Select("Select * from user where username = #{username}")
    User SelectByusername(String username);
}
